package com.tuanzi.loan.web.lazy.statistics.imei;

import com.tuanzi.loan.business.service.statistics.ImeiStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.imei.ImeiStatRequest;
import com.tuanzi.loan.vo.response.statistics.imei.ImeiStatResponse;
import org.springframework.data.domain.Page;

public class ImeiStatLazyDataModel extends BaseLazyDataModel<ImeiStatRequest, ImeiStatResponse> {

    private ImeiStatService service = SpringContextHolder.getBean(ImeiStatService.class);

    public ImeiStatLazyDataModel(ImeiStatRequest imeiStatRequest) {
        super(imeiStatRequest);
    }

    @Override
    protected Page<ImeiStatResponse> doLoad(PageSearcher<ImeiStatRequest> pageSearcher) {
        return service.list(pageSearcher);
    }
}
